Repository navigation
fix(deps): upgrade tar to 8 and override open to 11 to clear security-sca (DX-34589, DX-32702) - #393
Conversation
tar 7.5.23 has a batch of Snyk advisories (SNYK-JS-TAR-2331xxxx, published 2026-12-02), almost all fixed only in tar 8. They push the security-sca check over its High threshold on every cli-plugins PR. tar 8 removed Node streams: extract() now returns a promise and takes the archive as `input`, so the old `.pipe(tar.extract(...))` crashes. Rewrite extract() in both GitHub clients to give tar the gunzipped download as `input`. pipeline() forwards download and gunzip errors, so extract() still rejects with them (seed now also rejects on download errors). Also remove the @types/tar dev dependencies (tar ships its own types) and regenerate pnpm-lock.yaml with pnpm 10.28.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
🟠 High Severity - SLA Breached Issues (with fixes)Showing 1 issue(s) that have exceeded the 30-day SLA threshold:
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
❌ BUILD FAILED - Security checks failed Please review and fix the security vulnerabilities before merging. |
open@8.4.2 (SNYK-JS-OPEN-22112123, High) is past the 30-day SLA and is the last finding failing security-sca once tar is on 8. The fix exists only in open 11. It reaches cli-plugins through contentstack-content-type, the published @contentstack/cli-utilities@2.0.2 and @contentstack/cli-launch@1.11.4. Add a pnpm override to open 11.0.4 and regenerate pnpm-lock.yaml with pnpm 10.28.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
✅ BUILD PASSED - All security checks passed |
What was wrong
The required
security-scacheck fails on every cli-plugins PR (#391, #392). The team policy allows 25 High findings that have a fix, and we're at 54. 52 of them aretar@7.5.23(the SNYK-JS-TAR-2331xxxx advisories published 2026-12-02), and almost all are fixed only in tar 8.taris a direct dependency ofcontentstack-bootstrapandcontentstack-seed. Both use it to unpack the GitHub tarball of a starter app or a seed stack.A pnpm override to tar 8 doesn't work. tar 8 removed Node streams:
tar.extract()now returns a promise and takes the archive as aninputoption. Our code did.pipe(tar.extract({ cwd, strip: 1 })), which crashes on tar 8 withdest.on is not a function.Once tar is fixed, one finding is left:
open@8.4.2(SNYK-JS-OPEN-22112123). It is 32 days past its 30-day SLA, and the SLA check fails on it alone. This PR fixes both, sosecurity-scapasses in one go.Jira: DX-34589 (tar) and DX-32702 (open)
What this PR changes
contentstack-bootstrapandcontentstack-seed:tar^7.5.23→^8.1.2.extract()in each GitHub client now hands tar the gunzipped download:pipeline()forwards download and gunzip errors, soextract()still rejects with them. Bootstrap keeps returning'done'. Seed now also rejects when the download itself fails; before, it didn't listen for that.@types/tarfrom bootstrap (v6, stale), seed and import-setup (the v7 stub). tar ships its own types, and the stub pulled in an extra copy oftar.extracttests mockedtar.extractas a stream. They now mock it as tar 8 does (a promise that readsinput), and a new test covers download errors.pnpm-workspace.yaml: addsopen: 11.0.4tooverrides.openreaches us throughcontentstack-content-type, the publishedcli-utilities@2.0.2andcli-launch@1.11.4; the fix exists only inopen11. The published CommonJS packages still get a workingopen()from it on Node 22.12+, which I checked on Node 22.23.pnpm-lock.yamldeleted and regenerated with the pinned pnpm 10.28.0. It contains onlytar@8.1.2andopen@11.0.4.The commands, flags and output are unchanged.
How it was tested
Z_DATA_ERROR) still passes, and seed goes from 121 to 122 tests.contentstack/kickstart-next(cli-use) extracted 48 entries, and seedcontentstack/kickstart-stack-seed(latest release) extracted 43 entries with itsstack/folder.snyk test --all-projects: notaroropenfindings left. The only High finding with a fix isparse5@7.3.0(published 2026-11-23, within its SLA).Notes
SKIP_HOOK=1), because its Snyk step still fails on findings this PR doesn't touch. Talisman was run separately and passed.openoverride on its own).cli-cm-bootstrapandcli-cm-seed, then update the cli repo, which still getstar@7.5.24through the published 2.0.2 versions.Reviewers: @reeshika-h @netrajpatel
cc @pritesh-jain-cstk
🤖 Generated with Claude Code